<html>
<head>
<title>Login</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/bootstrap-theme.min.css" >
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/style.css">
	<script type="text/javascript" src="<?php echo base_url(); ?>public/css/jquery.min.js"></script>
</head>
</head>
<body>
	<?php 
		$p="catalog";
	?>	
	<?php
		$this->load->view("admin/head")
	?>
	<div class="container">
		<h1 >分类列表
			<a href="<?php echo site_url('admin/catalog/add'); ?>"><button type="button" class="btn btn-success pull-right">添加</button></a>
			</h1>	
		<table class="table table-bordered" >
			
				<tr>
					<th class="col-md-4">id</th>
					<th class="col-md-4">名称</th>
					<th class="col-md-4">操作</th>	
				</tr>
			
			
			<tr>
			<?php 
				foreach ($catalogs as $c){
			?>
				<td><?php echo $c->id;?></td>
				<td><?php echo $c->name; ?></td>
				<td>
					<a href="<?php echo site_url('admin/catalog/edit/'.$c->id);?>"><button type="button" class="btn btn-warning btn-sm">修改</button></a>
					<a class="del" href="<?php echo site_url('admin/catalog/delete/'.$c->id);?>"><button type="button" class="btn btn-danger btn-sm">删除</button></a>
				</td>
			</tr>
			<?php
				}
			?>

		</table>
	</div>
	</body>

